from datetime import datetime, timedelta

def Diagnosis(obj):
    now = datetime.now()
    a_month = now - timedelta(days=50)
    select = {'day': 'date(add_date)'}
    a_month_deploy = obj.filter(add_date__range = (a_month, now))\
        .extra(select = select).values('day')\
        .distinct().order_by("day").annotate()
    return